﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PServiceBus.MessageProxy {
    [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
    public class ESBRequestAttribute : Attribute {
        public string Topic { get; internal set; }
        public bool IsRequestClass { get; internal set; }
        
        public ESBRequestAttribute(string topic, bool isRequestClass = false) {
            Topic = topic;
            IsRequestClass = isRequestClass;
        }

        public ESBRequestAttribute(Type topicType, bool isRequestClass = false)
            : this(topicType.Name, isRequestClass){
        }
    }
}
